﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:LightControls">



    <Style TargetType="local:LcBusyIndicator">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:LcBusyIndicator">
                    <Grid x:Name="templateRoot">
                        <Grid.Resources>
                            <Storyboard x:Key="mainStory" RepeatBehavior="Forever" SpeedRatio="3">
                                <DoubleAnimation Storyboard.TargetName="recMotion1" Storyboard.TargetProperty="Height" AutoReverse="True" To="14" Duration="0:0:0.5">
                                </DoubleAnimation>
                                <DoubleAnimation Storyboard.TargetName="recMotion1" Storyboard.TargetProperty="(Canvas.Top)" AutoReverse="True" To="8" Duration="0:0:0.5">
                                </DoubleAnimation>

                                <DoubleAnimation Storyboard.TargetName="recMotion2" Storyboard.TargetProperty="Height" AutoReverse="True" BeginTime="0:0:1" To="14" Duration="0:0:0.5">
                                </DoubleAnimation>
                                <DoubleAnimation Storyboard.TargetName="recMotion2" Storyboard.TargetProperty="(Canvas.Top)" AutoReverse="True" BeginTime="0:0:1" To="8" Duration="0:0:0.5">
                                </DoubleAnimation>

                                <DoubleAnimation Storyboard.TargetName="recMotion3" Storyboard.TargetProperty="Height" AutoReverse="True" BeginTime="0:0:2" To="14" Duration="0:0:0.5">
                                </DoubleAnimation>
                                <DoubleAnimation Storyboard.TargetName="recMotion3" Storyboard.TargetProperty="(Canvas.Top)" AutoReverse="True" BeginTime="0:0:2" To="8" Duration="0:0:0.5">
                                </DoubleAnimation>

                                <DoubleAnimation Storyboard.TargetName="recMotion4" Storyboard.TargetProperty="Height" AutoReverse="True" BeginTime="0:0:3" To="14" Duration="0:0:0.5">
                                </DoubleAnimation>
                                <DoubleAnimation Storyboard.TargetName="recMotion4" Storyboard.TargetProperty="(Canvas.Top)" AutoReverse="True" BeginTime="0:0:3" To="8" Duration="0:0:0.5">
                                </DoubleAnimation>

                                <DoubleAnimation Storyboard.TargetName="recMotion5" Storyboard.TargetProperty="Height" AutoReverse="True" BeginTime="0:0:4" To="14" Duration="0:0:0.5">
                                </DoubleAnimation>
                                <DoubleAnimation Storyboard.TargetName="recMotion5" Storyboard.TargetProperty="(Canvas.Top)" AutoReverse="True" BeginTime="0:0:4" To="8" Duration="0:0:0.5">
                                </DoubleAnimation>
                            </Storyboard>
                        </Grid.Resources>
                        <Border Background="{TemplateBinding Background}">
                            <Canvas Width="30" Height="30" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10, 0">
                                <Rectangle  x:Name="recMotion1" Canvas.Top="10" Canvas.Left="0" Width="5" Height="10" Fill="{TemplateBinding Foreground}" Margin="1,0"/>
                                <Rectangle  x:Name="recMotion2" Canvas.Top="10" Canvas.Left="6" Width="5" Height="10" Fill="{TemplateBinding Foreground}" Margin="1,0"/>
                                <Rectangle  x:Name="recMotion3" Canvas.Top="10" Canvas.Left="12" Width="5" Height="10" Fill="{TemplateBinding Foreground}" Margin="1,0"/>
                                <Rectangle  x:Name="recMotion4" Canvas.Top="10" Canvas.Left="18" Width="5" Height="10" Fill="{TemplateBinding Foreground}" Margin="1,0"/>
                                <Rectangle  x:Name="recMotion5" Canvas.Top="10" Canvas.Left="24" Width="5" Height="10" Fill="{TemplateBinding Foreground}" Margin="1,0"/>
                            </Canvas>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
        
    

